<?php

declare(strict_types=1);

namespace App\Controller;

use Hyperf\ApiDocs\Annotation\Api;
use Hyperf\ApiDocs\Annotation\ApiHeader;
use Hyperf\ApiDocs\Annotation\ApiOperation;
use Hyperf\DTO\Annotation\Contracts\RequestBody;
use Hyperf\DTO\Annotation\Contracts\Valid;
use Hyperf\HttpServer\Annotation\Controller;
use Hyperf\HttpServer\Annotation\GetMapping;
use Hyperf\DTO\Annotation\Contracts\RequestQuery;
use Hyperf\ApiDocs\DTO\Response\Contact;
use Hyperf\Testing\Client;
use App\DTO\Request\UserQuery;

#[Controller(prefix: '/')]
#[Api(tags: 'Test管理控制器', position: 2)]
class TestController
{
    #[ApiOperation('查询', security: false)]
    #[GetMapping(path: 'query')]
    public function query(#[RequestQuery] #[Valid] UserQuery $request): array
    {
        return (array)$request;
    }

}